package com.example.ssm_demo1.Controller;import com.example.ssm_demo1.Service.UserService;import com.example.ssm_demo1.entity.Userinfo;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RestController;@RestController //添加进Spring并且接收Restquest@RequestMapping("/user")public class UserController {    @Autowired //依赖注入    private UserService userService;    @RequestMapping("getbyid")    public Userinfo getUserById(Integer id)    {        System.out.println("进入该方法");        return userService.getUserById(id);    }}